{% extends 'cms/base.html' %}

{% block title %}
发布课程
{% endblock %}

{% block head %}
    <script src="{% static 'ueditor/ueditor.config.js' %}"></script>
    <script src="{% static 'ueditor/ueditor.all.min.js' %}"></script>
    <script src="{% static 'js/pub_course.min.js' %}"></script>
{% endblock %}

{% block content-header %}
<h1>发布课程</h1>
{% endblock %}

{% block content %}
<div class="row">
    <div class="row-md-12">
        <div class="box">
            <div class="box-header"></div>
            <div class="box-body">
                <div class="form-group">
                    <label for="title-input">标题：</label>
                    <input type="text" name="title" class="form-control" id="title-input" placeholder="请输入课程标题">
                </div>
                <div class="form-group">
                    <label for="category-input">分类：</label>
                    <select name="category" class="form-control" id="category-input">
                        {% for category in categories %}
                           <option value="{{ category.pk }}">{{ category.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="teacher-input">讲师：</label>
                    <select name="teacher" class="form-control" id="teacher-input">
                        {% for teacher in teachers %}
                        <option value="{{ teacher.pk }}">{{ teacher.username }}</option>
                        {% endfor %}
                    </select>


                </div>
                <div class="form-group">
                    <label for="video-input">视频地址：</label>
                    <input type="text" name="video" class="form-control" id="video-input" placeholder="请输入课程封视频地址">
                </div>
                <div class="form-group">
                    <label for="thumbnail-input">封面图：</label>
                    <input type="text" name="thumbnail" class="form-control" id="thumbnail-input" placeholder="请输入课程封面图">
                </div>
                <div class="form-group">
                    <label for="price-input">价格：</label>
                    <input type="text" name="price" class="form-control" id="price-input" placeholder="请输入课程价格">
                </div>
                <div class="form-group">
                    <label for="time-input">时长：</label>
                    <input type="text" name="time" class="form-control" id="time-input" placeholder="请输入课程视频时长">
                </div>
                <div class="form-group">
                    <label for="editor">简介：</label>
                    <script id="editor" type="text/plain" name="profile">
                    </script>
                </div>
            </div>
            <div class="box-footer">
                <button class="btn btn-primary pull-right submit-btn">发布新闻</button>
            </div>
        </div>
    </div>
</div>
{% endblock %}